def fibonacciNum(n):
    if n==1 or n == 2:
        return 1
    else:
        return fibonacciNum(n-1)+fibonacciNum(n-2)
n=eval(input("请输入一个整数："))
print("斐波那契数列的第{}个数是：{}".format(n,fibonacciNum(n)))

def fibonacciSum(n):
    sum = 0
    for i in range(1,n+1):
        s=fibonacciNum(i)
        sum += s
    return sum

print("斐波那契数列的前{}个数的总和是：{}".format(n,fibonacciSum(n)))